package com.songlanyun.modules.cnarea.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 行政区域
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-13 22:33:46
 */
@Data
@TableName("sys_cn_area")
public class  CnArea implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 *
	 */
	@TableId
	private Integer id;
	/**
	 * 名称
	 */
	private String label;
	/**
	 * 行政编码
	 */
	private String value;
	/**
	 * 上级行政编码
	 */
	private String parent;
	/**
	 * 经度
	 */
	private String longitude;
	/**
	 * 维度
	 */
	private String latitude;
	/**
	 * 级别
	 */
	private Integer level;


	@TableField(exist = false)
	private List<CnArea> children;

	public CnArea()
	{}

	public final static  CnArea CN = new CnArea("中国","100000","","",0,"");

	public CnArea(String label,String value,String longitude,String latitude,Integer level,String parent)
	{
		this.label = label;
		this.value = value;
		this.longitude =longitude;
		this.latitude =latitude;
		this.level = level;
	}

}
